package com.hinner.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
@TableName("chinas")
public class Chinas implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("code")
    private Long code; //区域代码


    @TableField("name")
    private String name; //名称


    @TableField("pid")
    private Long pid;  //父id

    @TableField("level")
    private String level;  //1省2市3县

    @TableField(exist = false)
    private List<Chinas> cityList; //城市

    @TableField(exist = false)
    private List<Chinas> areaList; //县区

    @TableField(exist = false)
    private List<Chinas> children;

}
